import logging,yagmail

def log():
    logging.basicConfig(filename='log.txt',filemode='a+',level=logging.DEBUG,format='%(asctime)s->%(levelname)s->%(message)s')

def send_email(filename):
    email=yagmail.SMTP(user='1038995773@qq.com',password='pahznimdvxdtbegi',host='smtp.qq.com')
    email.send(to='1038995773@qq.com',subject='UI自动化报告',contents='报告内容',attachments=filename)